home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / dev / c / GAPLib.lha / GAPLib / wrappers / c_plus_plus / GAP.hh next >
Encoding:
Text File  |  1999-05-05  |  739 b   |  52 lines

  1.  
  2. #ifndef    __GAP_HH__
  3. #define    __GAP_HH__
  4.  
  5. extern "C" {
  6. #include <GAP.h>
  7. }
  8.  
  9. /* Taglist object */
  10.  
  11. class TagSet {
  12. public:
  13.     TagSet();
  14.     TagSet(struct TagItem *);
  15.     ~TagSet();
  16.  
  17.     void    Set(Tag,IPTR);
  18.     IPTR    Get(Tag);
  19.     void    Del(Tag);
  20.     int    Exists(Tag);
  21.     struct TagItem *List();
  22.  
  23. private:
  24.     int    MIdx,CIdx;    /* MaxIndex & CurrentIndex */
  25.     struct TagItem *Find(Tag);
  26.     struct TagItem *TagList;
  27. };
  28.  
  29. /* Population object */
  30.  
  31. class GPopulation {
  32. public:
  33.     GPopulation(int,int,struct TagItem *);
  34.     GPopulation(int,int);
  35.     ~GPopulation();
  36.  
  37.     struct Popstat *GetStats(void);
  38.     void    *GetMember(int);
  39.     int GetSize(void);
  40.     void SetSize(int);
  41.     int GetGeneration(void);
  42.  
  43.     void Evolve(struct TagItem *);
  44.     void Evolve(TagSet *);
  45.  
  46. private:
  47.     struct Population *Pop;
  48. };
  49.  
  50.  
  51. #endif
  52.